{% extends 'public.html.twig' %}

{% block title %}Phones: {{ model.brand.name }} {{ model.name }}{% endblock %}

{% block content %}
<h1>{{ model.brand.name }} {{ model.name }}</h1>
<img src="{{ asset(model.getImage()) }}" alt="{{ model.name }}" height="200" align="right">

<div class="model-table">
    <p><strong>Kućište:</strong> <span class="sub">{{ model.case }}</span></p>
    <p><strong>Baterija:</strong>
        <span class="sub">
            <strong>Tip: </strong><span>{{ model.batteryType }}</span>
            <strong>Kapacitet: </strong><span>{{ model.withUnit('batteryCapacity')|raw }}</span>
        </span>
    </p>
    <p>
        <strong>Ekran:</strong>
        <span class="sub">
            <strong>Tip:</strong><span>{{ model.displayType }}</span>
            <strong>Veličina:</strong><span>{{ model.withUnit('displaySize', 'length')|raw }}</span>
            <strong>Rezolucija:</strong><span>{{ model.withUnit('displayResolution', 'resolution')|raw }}</span>
        </span>
    </p>
    <p>
        <strong>Kamera:</strong>
        <span class="sub">
            <strong>Veličina:</strong><span>{{ model.withUnit('cameraSize')|raw }}</span>
            <strong>Rezolucija:</strong><span>{{ model.withUnit('cameraResolution', 'resolution')|raw }}</span>
            <strong>Ostalo:</strong><span>{{ model.cameraOther }}</span>
        </span>
    </p>
    <p>
        <strong>Zvuk:</strong>
        <span class="sub">
            <strong>Melodije:</strong><span>{{ model.soundMelodyType }}</span>
            <strong>Ostalo:</strong><span>{{ model.soundOther }}</span>
        </span>
    </p>
    <p>
        <strong>Memorija:</strong>
        <span class="sub">
            <strong>Interna:</strong><span>{{ model.withUnit('memoryInternal', 'memory')|raw }}</span>
            <strong>Kartica:</strong><span>{{ model.withUnit('memoryCard', 'memory')|raw }}</span>
            <strong>RAM:</strong><span>{{ model.withUnit('memoryRam', 'memory')|raw }}</span>
        </span>
    </p>
    <p><strong>Komunikacija:</strong><span class="sub">{{ model.data }}</span></p>
    <p><strong>Softver:</strong><span class="sub">{{ model.software }}</span></p>
    <br clear="all">

    <h2>Cene:</h2>
    <p class="price">
        {{ model.price|number_format(2, ",", ".") }}
        <span class="package">{{ model.package }}</span>
    </p>
</div><br clear="all">
{% endblock %}